package com.ruoyi.chy.api;

import com.ruoyi.chy.api.domain.Merchant;
import com.ruoyi.chy.api.domain.MerchantVerification;
import com.ruoyi.chy.api.factory.RemoteMerchantFallbackFactory;
import com.ruoyi.common.core.constant.SecurityConstants;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 用户服务
 * 
 * @author ruoyi
 */
@FeignClient(contextId = "remoteMerchantService", value = ServiceNameConstants.MERCHANT_SERVICE, fallbackFactory = RemoteMerchantFallbackFactory.class)
public interface RemoteMerchantService
{
    @GetMapping("/merchant/getList")
    public List<Merchant> getlist(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);
    @GetMapping("/verification/getMerchantByPhone")
    public MerchantVerification getMerchantByPhone(@RequestParam("phone") String phone, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}
